<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Register</title>
        <jsp:include page="headers.jsp" />
        <script language="javascript">
            $(function(){
                $('form').jqTransform({imgPath:'themes/form/img/'});
            });
        </script>
    </head>
    <body>
        <div id="main_container">
            <jsp:include page="loginheader.jsp" />
            <div class="main_content">
                <jsp:include page="${sessionScope.menuChoice}" /> <!-- include menu -->
                <div class="center_content">
                    <div class="left_content">        
                    </div> <!-- end left content -->
                    <div class="right_content">
                        <c:choose>
                            <c:when test="${requestScope.success == 'Username already exists.'}">
                                <h5 style="color:red">${requestScope.success}</h5>
                            </c:when>
                            <c:otherwise>
                                <h5 style="color:green">${requestScope.success}</h5>
                            </c:otherwise>
                        </c:choose>
                        <h2>Register</h2> <font color="red">*</font> Indicates required field
                        <fieldset>
                            <form action="Register" method="post">
                                <table>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>Username:</label>
                                        </td>
                                        <td>
                                            <input type="text" class="required" name="username" placeholder="Username" nicename="Username"/>

                                            <label class="thisrequired" style="margin-left: 25px"><font color="red">*</font>FBO ID:</label>
                                        </td>
                                        <td>
                                            <input type="text" disabled="disabled" name="fBOId" placeholder="1" value="1" nicename="FBO ID"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>Password:</label>
                                        </td>
                                        <td>
                                            <input type="password" class="required" minlength="8" placeholder="Minimum of 8 chars" name="password" nicename="Password"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label>Flight Hours:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="flightHour" placeholder="Flight hours"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>Type of User:</label>
                                        </td>
                                        <td>
                                            <select class="required" name="discriminator" nicename="discriminator">
                                                <option>Select Type</option>
                                                <option  value="student">Student</option>
                                                <option value="instructor">Instructor</option>
                                                <option value="reservationAgent">Reservation Agent</option>
                                                <option value="pilot">Pilot Customer</option>
                                                <option value="charterPilot">Charter Pilot</option>
                                                <option value="mechanic">Mechanic</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>First Name:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="firstName" class="required" placeholder="First Name" nicename="First Name"/>
                                            <label style="margin-left: 25px">Middle Initial:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="middleName" size="5" placeholder="Middle initial"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>Last Name:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="lastName" class="required" nicename="Last Name" mustmatch="^[a-zA-Z]+$" placeholder="Last Name"/>
                                            <label class="thisrequired" style="margin-left: 25px">Gender:</label>
                                        </td>
                                        <td>
                                            <select class="required" name="gender" nicename="gender">
                                                <option>Select Sex</option>
                                                <option>Female</option>
                                                <option>Male</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>Street:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="street" class="required" nicename="Street" placeholder="Street"/>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>State:</label>
                                        </td>
                                        <td>
                                            <jsp:include page="statechoice.jsp" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="thisrequired"><font color="red">*</font>City: </label>
                                        </td>
                                        <td>
                                            <input type="text" name="city" class="required" nicename="City" placeholder="City"/>
                                            <label class="thisrequired" style="margin-left: 25px"><font color="red">*</font>Zip Code: </label>
                                        </td>
                                        <td>
                                            <input type="text" name="zipCode" class="required" validateas="zipcode" nicename="Zip Code" placeholder="Zip Code"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label for="email">E-mail: </label>
                                        </td>
                                        <td>
                                            <input type="text" name="email" validateas="email" nicename="Email" placeholder="Email"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label for="birthdate"><font color="red">*</font>Birth Date: </label>
                                        </td>
                                        <td>
                                            <input id="birthdate" onmousedown="getBirthDate()" type="text" name="birthdate" nicename="birthdate" placeholder="Birthdate"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label>Home Phone:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="homePhone" validateas="phone" nicename="Home Phone" placeholder="Home Phone"/>
                                            <label style="margin-left: 25px">Cell Phone:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="cellPhone" validateas="phone" nicename="Cell Phone" placeholder="Cell Phone"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label>Work Phone:</label>
                                        </td>
                                        <td>
                                            <input type="text" name="workPhone" validateas="phone" nicename="Work Phone" placeholder="Work Phone"/>
                                        </td>
                                    </tr>
            
                                    <tr>
                                        <td></td><td></td><td></td><td>
                                            <input type="submit" name="button" value="Register"/>
                                        </td> </tr>
                                </table>
                            </form>
                        </fieldset>
                    </div><!-- end of right content-->
                </div>   <!--end of center content -->
                <div class="clear"></div>
            </div> <!--end of main content-->
            <div class="footer">
                <div class="left_footer"><a href="RedTeam">Powered by: Red Team</a><a href="http://apycom.com/"></a></div>
                <div class="right_footer"></div>
            </div> <!-- end footer -->
        </div> <!-- end main container -->
    </body>
</html>